import {categoryData} from '@/api/category'

const state = {
    categoryList:{}
};
const mutations = {
    SET_CATEGORYLIST(state,categoryList){
        state.categoryList = categoryList
    }
};
const actions = {
    async getCategoryList ({commit},categoryId){
        const result = await categoryData(categoryId)
        // console.log(result);
        commit('SET_CATEGORYLIST',result.data)
    }
};
const getters = {

};
export default {
  state,
  mutations,
  actions,
  getters,
};
